package Demo1299.Demo13;

import java.io.FileInputStream;
import java.lang.reflect.Method;
import java.util.Properties;

public class Demo1 {
    public static void main(String[] args) throws Exception {
        Properties prop = new Properties();
        FileInputStream in = new FileInputStream("C:\\Daymate\\src\\Demo1299\\Demo13\\DemoClass.properties");
        prop.load(in);
        in.close();
        Class<?> aClass = Class.forName(prop.getProperty("1"));
        Object o = aClass.getDeclaredConstructor().newInstance();
        Method run = aClass.getDeclaredMethod("run");
        run.invoke(o);
    }
}
